﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using LPY.LeHealth.DAL;
using LPY.LeHealth.DTO;

namespace LPY.LeHealth.Service
{
    public class QuestionService
    {
        private My_questions_DAL myQuestion;
        public QuestionService()
        {
            myQuestion = new My_questions_DAL();
        }
        /// <summary>
        /// 我的问答显示
        /// </summary>
        /// <returns></returns>
        public List<questions> GetQuestion(int id,string state)
        {
            return myQuestion.QuestionShow(id,state);
        }

        /// <summary>
        /// 根据ID显示提问问题
        /// </summary>
        /// <param name="uid"></param>
        /// <param name="Qstate"></param>
        /// <returns></returns>
        public List<questions> GetIdShow(int id)
        {
            return myQuestion.GetIdShow(id);
        }
        /// <summary>
        /// 问答显示锁芯数据
        /// </summary>
        /// <returns></returns>
        public List<questions> GetQueShow()
        {

            return myQuestion.GetQueShow();
        }
        /// <summary>
        //根据体检分类id和体检项id显示前5条
        //</summary>
        //<param name="id"></param>
        //<param name="eid"></param>
        //<returns></returns>
        public List<questions> GetQuestionshow(int eid, int id)
        {
            return myQuestion.GetQuestionshow(eid,id);
        }
        /// <summary>
        //根据体检分类id和体检项id显示前5条
        //</summary>
        //<param name="id"></param>
        //<param name="eid"></param>
        //<returns></returns>
        public List<questions> GetQuestionshowall(int eid, int id)
        {
            return myQuestion.GetQuestionshowall(eid, id);
        }
        /// <summary>
        //根据体检分类id显示问答信息前5条
        //</summary>
        //<param name="id"></param>
        //<param name="eid"></param>
        //<returns></returns>
        public List<questions> GetQuestionId(int Id)
        {
            return myQuestion.GetQuestionId(Id);
        }
        /// <summary>
        //根据体检分类id显示问答信息前5条
        //</summary>
        //<param name="id"></param>
        //<param name="eid"></param>
        //<returns></returns>
        public List<questions> GetQuestionIdall(int Id)
        {
            return myQuestion.GetQuestionIdall(Id);
        }
        /// <summary>
        /// 根据Id查询数据表数量
        /// </summary>
        /// <param name="Id"></param>
        /// <returns></returns>
        public int GetCount(int Id)
        {
            return myQuestion.GetCount(Id);
        }
        /// <summary>
        /// 查询默认显示的用户提问的问题前几条
        /// </summary>
        /// <param name="uid"></param>
        /// <param name="Qstate"></param>
        /// <returns></returns>
        public List<questions> GetNoConment(int uid, string Qstate)
        {
            return myQuestion.GetNoConment(uid,Qstate);
        }
        /// <summary>
        /// 查询默认显示的用户提问的问题
        /// </summary>
        /// <param name="uid"></param>
        /// <param name="Qstate"></param>
        /// <returns></returns>
        public List<questions> GetNoConmentall(int uid, string Qstate)
        {
            return myQuestion.GetNoConmentall(uid, Qstate);
        }
        /// <summary>
        /// 搜索
        /// </summary>
        /// <param name="Tid"></param>
        /// <param name="content"></param>
        /// <returns></returns>
        public List<questions> GetQuesionSeach(string content)
        {
            return myQuestion.GetQuesionSeach(content);
        }
        /// <summary>
        /// 获取解决问题数量
        /// </summary>
        /// <returns></returns>
        public int GetQuesionCount()
        {
            return myQuestion.GetQuesionCount();
        }
    }
}
